new Vue({

    el:'#fortuneMessApp',
    data:{

        integralDeail:[],  //积分记录详情
        couponList:[],   //优惠券数组
    },
    mounted:function () {

        //获取积分记录
        this.queryIntegralDetail();

        //获取优惠券数组
        this.queryMyCoupon();

    },
    methods:{

        integralInfo:function () {

            $('#integralModal').modal("show");

        },
        //获取积分记录信息
        queryIntegralDetail:function () {
            var it = this;
            axios({
                url:'/logistics/customer/queryIntegralDetail',
                method:'get',
            }).then(function (res) {

                it.integralDeail = res.data.data;

            }).catch(function (error) {
                console.log("异常啦")
            })

        },
        //打开积分明细模态框
        openIntegralDetail:function () {

            $('#integralDetailModal').modal("show");

        },
        //打开我的抵用券模态框
        openMyCouponModal:function () {
            $('#myCouponModal').modal("show");
        },
        //获取我的抵用券
        queryMyCoupon:function () {
            var it = this;
            axios({
                url:'/logistics/customer/queryCouponByCustomerId?type=1',
                method:''
            }).then(function (res) {

                it.couponList = res.data.data;


            }).catch(function (error) {

            })

        }


    }

})
